﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace DataCoreTechnologies.Scribe
{
    public partial class ColorOptionsForm : Form
    {
        //Constructor
        public ColorOptionsForm()
        {
            InitializeComponent();
        }
        #region Internal
        internal Color TopMenuColor { get; set; }
        internal Color SelectedItemColor { get; set; }
        internal Color EvenRowColor { get; set; }
        internal new DialogResult DialogResult { get; private set; }
        #endregion
        #region Private
        private void btnEvenRow_Click(object sender, EventArgs e)
        {
            if (colorDialog1.ShowDialog() != DialogResult.Cancel)
            {
                EvenRowColor = colorDialog1.Color;
                txtEvenRow.BackColor = EvenRowColor;
            }
        }
        private void btnSelectedItem_Click(object sender, EventArgs e)
        {
            if (colorDialog1.ShowDialog() != DialogResult.Cancel)
            {
                SelectedItemColor = colorDialog1.Color;
                txtHighlightedItem.BackColor = SelectedItemColor;
            }
        }
        private void btnTopMenu_Click(object sender, EventArgs e)
        {
            if (colorDialog1.ShowDialog() != DialogResult.Cancel)
            {
                TopMenuColor = colorDialog1.Color;
                txtDefault.BackColor = TopMenuColor;
            }
        }
        private void frmColorOptions_Load(object sender, EventArgs e)
        {
            txtDefault.BackColor = TopMenuColor;
            txtHighlightedItem.BackColor = SelectedItemColor;
            txtEvenRow.BackColor = EvenRowColor;
        }
        private void btnCancel_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.Cancel;
            this.Close();
        }
        private void btnSave_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.OK;
            this.Close();
        }
        #endregion
    }
}
